package com.example.back.dao;

import com.example.back.bean.ShufflePoints;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.math.BigInteger;
import java.util.List;

@Mapper
public interface ShufflePointsDao {
    @Select("select * from shuffle_point")
    List<ShufflePoints> getShufflePointsValue();

    @Update("update shuffle_point set shufflePoints=#{shuffle}")
    void updateShufflePoints(long shuffle);

    @Select("select * from shuffle_point where groupId = #{groupId}")
    ShufflePoints getShufflePointsByGroupId(Integer groupId);

    @Update("update shuffle_point set shufflePoints=#{shufflePoints} where groupId=#{groupId}")
    void updateShufflePointByGroupId(long shufflePoints,Integer groupId);

    @Insert("insert into shuffle_point (shufflePoints,groupId)values(#{shufflePoints},#{groupId})")
    void insertShufflePoints(long shufflePoints,Integer groupId);
}
